<{insert_scripts files="./js/jquery.min.js,admin.js,jquery.boxy.js,swfobject.js,jquery.uploadify.v2.1.4.min.js"}>
<form name="form1" method="post" id="form1" action="./index.php?c=admin&a=file&mod=manage&act=save" style="width:500px">
  <div class="box">
    <div class="box2">
      <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <th> 文件名称：</th>
          <td><input name="fileName" type="text" autocomplete="off" id="TextBox1" class="txtbox_P"
                                style="width: 160px;" />
          </td>
        </tr>
        <tr>
          <th> 文件链接：</th>
          <td ><span id="upbtn">
            <input id="file_upload" type="file" name="file_upload" />
            </span><a id="remote" href="#"><span id="remoteBtn" style=" width:120px; height:30px; margin-top:0px; margin-left:8px; background:url(./images/admin/button.jpg); display:block;"></span><a><span id="upvalue" style="display:none">
            <input name="file_url" type="text" value=""  readonly="readonly" style="width: 160px;" />
            </span></td>
        </tr>
        <tr>
          <th style="border-bottom: #cccccc 1px solid">显示顺序：</th>
          <td><input name="showOrder" type="text" autocomplete="off" id="TextBox4" value="0"  class="txtbox_P"style="width: 160px;" />
            </td>
        </tr>
        <tr>
          <th> 文件状态：</th>
          <td>
            <label for="file_status"></label>
  <select name="file_status" id="file_status">
       <option value="0">屏蔽</option> 
       <option value="1" selected="selected">显示</option>
  </select>
           </td>
        </tr>        
      </table>
    </div>
  </div>
  <p style="padding: 15px; text-align: center;">
    <input type="submit" name="Button2" value="保存" 
                id="Button2" class="add" style="font-weight: bold; width: 70px;" />
    &nbsp;</p>
  <script type="text/javascript"> 
	$(function(){
		$("#remote").bind("click",function(){
			$(this).hide();
			$("#upbtn").hide("fast");
			$("input[name='file_url'] ").attr("readonly",false);
			$("#upvalue").show();			
			})	
	 $('#file_upload').uploadify({
    'uploader'  : './include/uploadify/uploadify.swf',
    'script'    : './include/uploadify/uploadify.php',
    'cancelImg' : './include/uploadify/cancel.png',
    'folder'    : './upload/others',
	'buttonImg' : './include/uploadify/button.jpg',
	'sizeLimit'   : 1024000,
    'auto'      :  true,
  	'onComplete'  : function(event, ID, fileObj, response, data) {
	$("#upbtn,#remote").hide("fast");
	$("input[name='file_url'] ").val("./upload/others/"+fileObj.name);
	$("#upvalue").show();
     // alert(fileObj.name);
    }
  });
	})
</script> 
</form>
